package repository

import entity.SignUpActivity

interface SignUpActivityRepository: BaseRepository<SignUpActivity> {
    /**
     * 根据参与者id查找所有的项(包括申请中,申请通过,申请未通过)
     */
    fun findByUserId(uId: Int): List<SignUpActivity>
    fun findByUserId(uId: Int, pageable: Pageable): Page<SignUpActivity>

    /**
     * 根据活动id查找所有的项(包括申请中,申请通过,申请未通过)
     */
    fun findByActivityId(aId: Int): List<SignUpActivity>
    fun findByActivityId(aId: Int, pageable: Pageable): Page<SignUpActivity>


    /**
     * 根据参与者id和活动id查找
     */
    fun findByActivityIdAndUserId(aId: Int, uId: Int): SignUpActivity


    /**
     * 查找已经通过活动发起者审核的项(全部)
     */
    fun findByPassedTrue(): List<SignUpActivity>
    fun findByPassedTrue(pageable: Pageable): Page<SignUpActivity>

    /**
     * 查找未通过活动发起者审核的项(全部)
     */
    fun findByPassedFalse(): List<SignUpActivity>
    fun findByPassedFalse(pageable: Pageable): Page<SignUpActivity>

    /**
     * 查找某参与者已经通过发起者审核的项
     */
    fun findByUserIdAndPassedTrue(userId: Int): List<SignUpActivity>
    fun findByUserIdAndPassedTrue(userId: Int, pageable: Pageable): Page<SignUpActivity>

    /**
     * 查找某参与者未通过发起者审核的项
     */
    fun findByUserIdAndPassedFalse(userId: Int): List<SignUpActivity>
    fun findByUserIdAndPassedFalse(userId: Int, pageable: Pageable): Page<SignUpActivity>

    /**
     * 查找某参与者正在等待审核的项
     */
    fun findByUserIdAndPassedIsNull(userId: Int): List<SignUpActivity>
    fun findByUserIdAndPassedIsNull(userId: Int, pageable: Pageable): Page<SignUpActivity>

    /**
     * 查找某活动已经通过审核的参与者的项
     */
    fun findByActivityIdAndPassedTrue(activityId: Int): List<SignUpActivity>
    fun findByActivityIdAndPassedTrue(activityId: Int, pageable: Pageable): Page<SignUpActivity>

    /**
     * 查找某活动未审核的参与者的项
     */
    fun findByActivityIdAndPassedFalse(activityId: Int): List<SignUpActivity>
    fun findByActivityIdAndPassedFalse(activityId: Int, pageable: Pageable): Page<SignUpActivity>

    /**
     * 查找某活动正在等待审核中的参与者的项
     */
    fun findByActivityIdAndPassedIsNull(activityId: Int): List<SignUpActivity>
    fun findByActivityIdAndPassedIsNull(activityId: Int, pageable: Pageable): Page<SignUpActivity>

    /**
     * 查找某活动未签到的项
     */
    fun findByActivityIdAndSignFalse(activityId: Int): List<SignUpActivity>
    fun findByActivityIdAndSignFalse(activityId: Int, pageable: Pageable): Page<SignUpActivity>

    /**
     * 查找活动已签到的项
     */
    fun findByActivityIdAndSignTrue(activityId: Int): List<SignUpActivity>
    fun findByActivityIdAndSignTrue(activityId: Int, pageable: Pageable): Page<SignUpActivity>


    /**
     * 查找某用户未签到的项
     */
    fun findByUserIdAndSignFalse(userId: Int): List<SignUpActivity>
    fun findByUserIdAndSignFalse(userId: Int, pageable: Pageable): Page<SignUpActivity>

    /**
     * 查找某用户已签到的项
     */
    fun findByUserIdAndSignTrue(userId: Int): List<SignUpActivity>
    fun findByUserIdAndSignTrue(userId: Int, pageable: Pageable): Page<SignUpActivity>
}